package mn.idax.exchange.otc.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import mn.idax.exchange.otc.entity.OTCBeneficiarys;
import mn.idax.exchange.otc.entity.OTCBeneficiarysExample;
import mn.idax.exchange.otc.vo.PayMethodDetailDTO;

public interface OTCBeneficiarysMapper {
    int countByExample(OTCBeneficiarysExample example);

    int deleteByExample(OTCBeneficiarysExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(OTCBeneficiarys record);

    int insertSelective(OTCBeneficiarys record);

    List<OTCBeneficiarys> selectByExampleWithRowbounds(OTCBeneficiarysExample example, RowBounds rowBounds);

    List<OTCBeneficiarys> selectByExample(OTCBeneficiarysExample example);

    OTCBeneficiarys selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") OTCBeneficiarys record, @Param("example") OTCBeneficiarysExample example);

    int updateByExample(@Param("record") OTCBeneficiarys record, @Param("example") OTCBeneficiarysExample example);

    int updateByPrimaryKeySelective(OTCBeneficiarys record);

    int updateByPrimaryKey(OTCBeneficiarys record);
    
    List<OTCBeneficiarys> selectByUserID(Integer userId);

    List<PayMethodDetailDTO> getPayMethodDetail(@Param("adId")Integer adId);
    
    OTCBeneficiarys selectByUserIDAndType(OTCBeneficiarys record);

    /**
     * 显示未隐藏的支付方式
     * @param userId
     * @return
     */
    List<OTCBeneficiarys> showDisplayBeneficiarys(Integer userId);

    /**
     * 获取用户开启的支付方式条数
     * @param userId
     * @return
     */
    Integer getCountDisplayBeneficiarys(Integer userId);
}